<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <link href="/Show/Admin/Public/css/news.css" type="text/css" rel="stylesheet">
    <script type="text/javascript" src="/Show/Admin/Public/js/jquery-3.1.1.min.js"></script>
    {literal}
    <script type="text/javascript">
        $(document).ready(function(){
            $("input").change(function(){
                var id   = $(this).attr('fd');
                var sort = $(this).val();
                $.post('sort_change',{id:id,sort:sort},function(data){
                    if(data){
                        alert(data);
                    }
                });
            });
        });
    </script>
    {/literal}
    <title>栏目</title>
   </head>
   <body>
    <form action="add_newsclass.php" method="post">
    <div class="mainbox">
          <div class="tablebox">
            <table class="table">
              <tr class="one">
                <td>ID</td>
                <td>栏目名称</td>
                <td>内容数</td>
                <td>是否在导航条显示？</td>
                <td>排序</td>
                <td id="a">操作</td>
              </tr>
              {section name=n loop=$flist}
              <tr>
                <td>{$flist[n].id}</td>
                <td><strong>{$flist[n].name}</strong></td>
                <td><a href="{$smarty.const.__MODULE__}/News/class_check/id/{$flist[n].id}/name/{$flist[n].name}">查看</a></td>
                <td>{if $flist[n].state==0}不显示{else}显示{/if}</td>
                <td><input name="sort" fd="{$flist[n].id}" type="text"  value="{$flist[n].sort}"></td>
                <td>
                  <a href="#" onclick="if(confirm('确定删除?'))(location.href='{$smarty.const.__CONTROLLER__}/delete/id/{$flist[n].id}')"><img src="/Show/Admin/Public/image/del.jpg"  class="pit" title="删除"></a>
                  <a href="#" onclick="location.href='{$smarty.const.__CONTROLLER__}/xiugai/id/{$flist[n].id}'" ><img src="/Show/Admin/Public/image/edi.jpg" class="pit"  title="编辑"></a>
                </td>
              </tr>                        
              {/section}
              </table>
          </div>
    </div>
    </form>
  </body>
</html>